#include<iostream>
#include<stdio.h>
#include <iomanip>
using namespace std;
double bit = 3.14159;
class circle
{
	int r;
protected:
	double result;
public:
	circle(int i)
	{
		r=i;
	}
void GoArea()
		{
			result=bit*r*r;
		}
	void ShowData()
		{
		printf("%0.2lf",result);
		}
 };
class ellipse
{
 	double a,b;
protected:
 	double result;
public:
	ellipse(double A,double B)
	{
		a=A;
		b=B;
	}
		void GoArea()
		{
			result=bit*a*b;
		}
		void ShowData()
		{
			cout<<result;
		}
 };
 class rectangle
 {
 	double a,b;
protected:
	double result;
public:
	rectangle(double A,double B)
	{
		a=A;
		b=B;
	}
     	void GoArea()
		{
			result=a*b;
		}
		void ShowData()
		{
			printf("%.2lf",result);
		}	
 };
 class triangle
 {
 	double a,b;
protected:
    double result;
public:
	triangle(int A,int B)
	{
		a=A;
		b=B;
	}
 		void GoArea()
		{
			result=a*b/2;
		}
		void ShowData()
		{
				printf("%.2lf",result);
		}	
 };
 class sphere:public circle
 {
 	int r;
 public:
 	sphere(int i)
 	:circle(i)
 	{
 		r=i;
	 }
 void GoArea()
 {
   	result=r*r*r*4*bit/3;
}	

};
class cylinder:public circle
{
	int R;
	int h;
public:
	void GoArea()
	{
		result=2*bit*R*R+2*R*bit*h;
	}
	void GoVolume()
	{
		result=bit*R*R*h;
	}
};
class cuboid:public rectangle
{
	int a,b,c;
	int h;
public:
	void GoArea()
	{
	result=2*(a*b+b*c+c*a);
	}
	void GoVolume()
	{
		result=a*b*c;
	}
};
 int main()
 {
 	int i=0;
 	cin>>i;
 	int r;
	 double a,b;
 switch(i)
 {
 	case 1:
 	{
		 	cin>>r;
 		circle c(r);
 		c.GoArea();
 		c.ShowData();
 	}	break;
 	case 2:
 	{
		 	cin>>a>>b;
 		ellipse m(a,b);
 		m.GoArea();
 	m.ShowData();
 	}	break;
 	case 3:
 	{
		 	cin>>a>>b;
 		rectangle f(a,b);
 		f.GoArea();
 		f.ShowData();
 		}break;
 	case 4:
 		{
		 cin>>a>>b;
 		triangle t(a,b);
 		t.GoArea();
 		t.ShowData();
 	}	break;
 	case 5:
 	{
		 	cin>>r;
 		sphere s(r);
 		s.GoArea();
 		s.ShowData();
 		}break;
 			
 }
 	return 0;
 }
